<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>咨询管理--咨询活动管理</title>
	<script type='text/javascript' src='${ctx}/js/Ajax.js'></script>
	<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
</head>
	
<body>
	<html:form action="/others/myMessageManage" method="post">
		<br><input type="hidden" name="method" value="addAct" />
		<table width="500px" align="center">
			<tr>
				<th colspan="3" height="25px">
					咨询活动管理
				</th>
			</tr>
			<tr>
				<td  class="td_01">
					活动关键字：
				</td>
				<td align="center">
					<input type="text" value="" name="code" /><font color="#ff3300">${error}</font>
				</td>
				<td  class="td_01">
					<input type="submit" class="btn" value="注册咨询活动">
				</td>
			</tr>
			<logic:present name="values">
				<logic:iterate id="value" name="values">
					<tr>
						<td class="td_05">
							${value}
						</td>
						<td class="td_05">
							<select id="${value}" onchange="javascript:updateActYes('${value}')">
							<option>不可用</option>
							<option>可用</option>
							</select>
						</td>
						<td  class="td_03">
							<a href="${ctx}/others/myMessageManage.do?method=list&myMessage.code=${value}">咨询活动管理</a>
						</td>
					</tr>
				</logic:iterate>
			</logic:present>
		</table>
	</html:form>
	<input type="hidden" id="ctx" value="${ctx}">
</body>
<script type="text/javascript">
 window.onload=function(){
     var ajax=new Ajax();
     var ctx=document.getElementById("ctx");
     ajax.ajaxRequest(ctx.value+"/others/myMessageManage.do","method=actyes","get",backActyes);
 }
 function backActyes(str){
     var strs=str.split(",");
     for(var i=0;i<strs.length;i++){
         var selecto=document.getElementById(strs[i]);
         selecto.selectedIndex=1;
     }
 }
 function updateActYes(act){
     var ajax=new Ajax();
     var ctx=document.getElementById("ctx");
     var actyes=document.getElementById(act);
     ajax.ajaxRequest(ctx.value+"/others/myMessageManage.do","method=updateActyes&selectedIndex="+actyes.selectedIndex+"&actyes="+encodeURI(act),"get");
 }
</script>
</html>